#ifndef OBDII_4G_H
#define OBDII_4G_H

#include <QObject>
#include "socketthread.h"
#include "agreement/agreement.h"
#include "agreement/obd_shanghai.h"
#include "socketclient.h"

class OBDII_4G : public SocketThread
{
    Q_OBJECT
public:
    explicit OBDII_4G(QString _objName, QObject *parent = nullptr);
    //void login(void);
//    void logout(void);
//    void UTC(void);
//    void report(void);
//    void report_later(void);
//    void upload(void);
    static void set_ssl(const enum ssl_type _ssl)
    {
        ssl = _ssl;
    }

protected:
    int thread_id;
    int get_thread_id(void);
    virtual int init(const QString _hostName, const quint16 _port) override;

signals:

public slots:

private slots:
    void connected();
    void readyRead();
    void error(QAbstractSocket::SocketError socketError);

private:
    static enum ssl_type ssl;

};

class SocketThreadClient : public OBDII_4G
{
    Q_OBJECT
public:
    explicit SocketThreadClient(QObject *parent = nullptr) : OBDII_4G("SocketThreadClient", parent)
    {
        ;
    }

signals:

public slots:
    virtual void doWork(const QString parameter) override;

private:

};
class SocketThreadDownload : public OBDII_4G
{
    Q_OBJECT
public:
    explicit SocketThreadDownload(QObject *parent = nullptr) : OBDII_4G("SocketThreadDownload", parent)
    {
        ;
    }

signals:

public slots:
    virtual void doWork(const QString parameter) override;

private:

};

#endif // OBDII_4G_H
